<?php
class Gioithieu extends CI_Controller
{
    public function __construct() {
        parent::__construct();
        $this->load->helper('url');
    }
    
    public function index()
    {
        $this->load->model('Nkdefault', 'default');
        $this->load->model('admin/managebaiviet','baiviet');
         $this->load->model('admin/managethongbao', 'thongbao');        
        $temp['title'] = 'Giới thiệu';
        $temp['template'] = 'gioithieu';
        $temp['data']['info'] = 'Giới thiệu chung';
        $temp['danhmuc']['menu'] = $this->default->loadDanhMuc();
        $temp['online'] = $this->useronline->countOnline();
        $temp['danhmuc']['currentItem'] = 'gioithieu';
        $where = array('madanhmuc' => 'gioithieu');
        $baiviet = $this->baiviet->LoadBaiViet($where);
        if(!empty($baiviet)) $temp['danhmuc']['content'] = $baiviet->result_array();
         
         //load thong bao
        $thongbao = $this->thongbao->LoadThongBao(null, null, 1, 0);
        if(!empty($thongbao)) $temp['thongbao'] = $thongbao->result_array(); 
        $this->load->view('template/layout', $temp);
    }
}
?>